(function(){
    //用户中心菜单 ==更多搜索
    var setInterval001="";
    function userSelectShow(){
        clearInterval(setInterval001);
        var _username=$("#selectNavUserName");
        _username.find("div").css({width:_username.width()-24});
        _username.css({width:_username.width()});
        _username.addClass("on");
        var _oLeft=_username.offset().left,
            _oTop=_username.offset().top;
        var	_oHeight=_username.outerHeight();
        $("#userMenu_option").css({"left":_oLeft-(194-_username.width()),"top":_oTop+_oHeight+1});
        $("#userMenu_option").show();
    }
    function userSelectHide(){
        clearInterval(setInterval001);
        var _username=$("#selectNavUserName");
        setInterval001=setInterval(function(){
            _username.removeClass("on");
            $("#userMenu_option").hide();
        },50);
    }
    $("#selectNavUserName").hover(
        function () {
            userSelectShow();
        },
        function () {
            userSelectHide();
        }
    );
    $("#userMenu_option").hover(
        function () {
            userSelectShow();
        },
        function () {
            userSelectHide();
        }
    );
    //全局菜单
    var setInterval002="";
    function globalSelectShow(){
        clearInterval(setInterval002);
        var _menu=$("#selectNavGlobalMenu");
        _menu.addClass("on");
        var _oLeft=_menu.offset().left,
            _oTop=_menu.offset().top;
        var	_oHeight=_menu.outerHeight();
        $("#globalMenu_option").css({"left":_oLeft-432,"top":_oTop+_oHeight});
        $("#globalMenu_option").show();
    }
    function globalSelectHide(){
        clearInterval(setInterval002);
        var _username=$("#selectNavGlobalMenu");
        setInterval002=setInterval(function(){
            _username.removeClass("on");
            $("#globalMenu_option").hide();
        },50);
    }
    $("#selectNavGlobalMenu").hover(
        function () {
            globalSelectShow();
        },
        function () {
            globalSelectHide();
        }
    );
    $("#globalMenu_option").hover(
        function () {
            globalSelectShow();
        },
        function () {
            globalSelectHide();
        }
    );
    //更多搜索
    var setInterval003="";
    function moreSearchShow(){
        clearInterval(setInterval003);
        var _more=$("#selectNavMoreSearch");
        _more.addClass("on");
        var _oLeft=_more.offset().left,
            _oTop=_more.offset().top;
        var	_oHeight=_more.outerHeight();
        $("#moreSearch_option").css({"left":_oLeft,"top":_oTop+_oHeight});
        $("#moreSearch_option").show();
    }
    function moreSearchHide(){
        clearInterval(setInterval003);
        var _username=$("#selectNavMoreSearch");
        setInterval003=setInterval(function(){
            _username.removeClass("on");
            $("#moreSearch_option").hide();
        },50);
    }
    $("#selectNavMoreSearch").hover(
        function () {
            moreSearchShow();
        },
        function () {
            moreSearchHide();
        }
    );
    $("#moreSearch_option").hover(
        function () {
            moreSearchShow();
        },
        function () {
            moreSearchHide();
        }
    );
    //person 页面公共搜索
    var person_search =[
        {"value":1,"text":"全文"},
        {"value":2,"text":"职位"},
        {"value":3,"text":"公司"}
    ]
    $("#person_search").select({
        optionData:person_search,
        css:'indexOptions',
        offset:Array(0,1)
    });
})(jQuery);